package com.example.ordersystem.domain;



import java.io.File;
import java.io.Serializable;

public class Comment implements Serializable {

    public static final String WORTHY ="物有所值";
    public static final String EFFICIENT ="配送快捷";
    public static final String SINCERE ="服务真诚";
    public static final String GENEROUS ="份大量足";
    /**评论上传的图片,存储路径*/
    public static final String PATH="/commentPictures";
    /**订单编号*/

    private int num;
    /**顾客编号*/

    private int customerNum;

    /**订单编号*/

    private String orderNum;

    /**评价等级*/

    private int grade;

    /**评价内容*/

    private String content;

    /**评价配图*/

    private String picture;

    public static String getWORTHY() {
        return WORTHY;
    }

    public static String getEFFICIENT() {
        return EFFICIENT;
    }

    public static String getSINCERE() {
        return SINCERE;
    }

    public static String getGENEROUS() {
        return GENEROUS;
    }

    public static String getPATH() {
        return PATH;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public int getCustomerNum() {
        return customerNum;
    }

    public void setCustomerNum(int customerNum) {
        this.customerNum = customerNum;
    }

    public String getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(String orderNum) {
        this.orderNum = orderNum;
    }

    public int getGrade() {
        return grade;
    }

    public void setGrade(int grade) {
        this.grade = grade;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }



    public Comment() {
        super();
    }

    public String getPicture() {
        if (picture == null || picture.length() == 0) {
            return "";
        }
        return PATH.concat(File.separator).concat(picture);
    }

    /**
     * 评价的标签定义
     */
    public static class Label implements Serializable{
        /**标签名字*/

        String name;
        /**标签出现的次数*/

        int count;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getCount() {
            return count;
        }

        public void setCount(int count) {
            this.count = count;
        }
    }
}
